using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using cde.UserControl;

[assembly: TagPrefix("UI.UserControl", "ui")]
namespace UI.UserControl
{
    public class SimpleSingleEditDG : cde.UserControl.SingleEditDataGrid
    {
        protected override void setColumns()
        {
            for (int i = 0; i < Size; i++)
            {
                BoundColumn bc = new BoundColumn();
                bc.DataField = "Lable_" + i;
                bc.HeaderText = "Lable_" + i;
                _dt.Columns.Add("Lable_" + i);
                //bc.ItemStyle.CssClass = "single_l";
                bc.ItemStyle.HorizontalAlign = HorizontalAlign.Right;
                bc.HeaderStyle.Width = Unit.Parse("15%");

                this.Columns.Add(bc);

                TemplateColumn tc = new TemplateColumn();
                tc.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
                //tc.ItemStyle.CssClass = "single_v";
                tc.ItemStyle.Wrap = false;
                tc.ItemTemplate = new CssEditAttibutuITemplate("Value_" + i);
                _dt.Columns.Add("Value_" + i, typeof(AttrbuteWithValue));
                this.Columns.Add(tc);
            }
        }
    }
}
